# ---
class Animal:
    def __init__(self, name):
        self.name = name
    def eat(self):
        print(f'{self.name} eat')
    def drink(self):
        print(f'{self.name} drink')
    def run(self):
        print(f'{self.name} run')
    def sleep(self):
        print(f'{self.name} sleep')

# ---
class Dog(Animal):
    def __init__(self, name, age, color):
        Animal.__init__(self, name)
        self.age = age
        self.color = color
    def bark(self):
        print(f'{self.name} bark')
    def say(self):
        print(f'{self.name} say {self.age} {self.color}')

# ---
if __name__ == '__main__':
    d1 = Dog('dog1', 2, 'blue')
    print(d1.name)
    d1.eat()
    d1.drink()
    d1.run()
    d1.sleep()
    print(d1.age)
    print(d1.color)
    d1.bark()
    d1.say()
